package com.ars.other;

import com.ars.main.StageCollection;

import javax.swing.*;

public class LogOff {

    public void Show() {
        int choice = JOptionPane.showConfirmDialog(null,
                "继续操作将会返回登录界面，点击确认继续。",
                "警告", JOptionPane.YES_NO_OPTION);
        if (choice == 0) {
            //跳转至登录面板
            StageCollection.getInstance().get("mainStage").close();
            StageCollection.getInstance().get("loginStage").show();
        }
    }

}
